<template>
   <div>
     <el-menu router>
       <el-submenu v-for="(item,index) in this.$router.options.routes" :key="index" v-if="!item.hidden">
         <template slot="title">
           <i class="el-icon-location"></i>
           <span>{{item.name}}</span>
         </template>
           <el-menu-item :index="children.path" v-for="(children,indexj) in item.children" :key="indexj">
             {{children.name}}
           </el-menu-item>
       </el-submenu>
     </el-menu>
   </div>
</template>

<script>
export default {
  name: "Aside",
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style scoped>

</style>
